Objects


We will start this section with some definitions of the term object: Object - an object is an encapsulation of a set of operations or methods which can be invoked externally and of a state which remembers the effects of the methods.

"Object" is the fundamental notion of object-orientation. It is traditionally defined as a representation of an entity which is uniquely identifiable (Object Identity), which has an updateable state (Object Behavior). Further an object has the same structural and behavioral characteristics - but not the same identity - as other objects (Classification) and an object has relationships to other objects (Relationships between Objects).

Object-oriented software is all about objects. An object is a "black box" which receives and sends messages. A black box actually contains code (sequences of computer instructions) and data (information which the instructions operates on). Traditionally, code and data have been kept apart (as in the C language).

Not so for object-oriented software! In OO (Object Oriented) programming, code and data are merged into a single indivisible thing -- an object. A primary rule of object-oriented programming is this: as th user of an object,you should never need to peek inside the box!

As all communication to it is done via messages. The object which a message is sent to is called the receiver of the message. Messages define the interface to the object. Everything an object can do is represented by its message interface. So you shouldn't have to know anything about what is in the black box in order to use it.


Now go on to ...
Introduction to Objects
Object Identity
Object State
Object Behaviour